2,996,979
511,675
July 1st, 2021
Our project aimed to characterize the public opinion of the COVID-19 pandemic by applying machine learning on COVID-related tweets. Our methodology is detailed below:
We queried the pre-curated dataset of COVID-related tweets published by Chen et al. in JMIR for those tweets posted on July 1st, 2021. A total of 2,996,979 tweets were identified.
We filtered this initial dataset for tweets which were written in the English language and which were not retweets (i.e., were original content). The resulting 540,642 tweets were hydrated in Python using the Twitter API.
The 511,675 successfully hydrated tweets were parsed from JSON/HTML and cleaned in R, followed by feature extraction (e.g., hashtags, URLs, replies, retweets, location, etc.).
Finally, we used natural language processing tools including structural topic modeling to derive aggregate features from our dataset.
Analyses were performed in Python and R. All code is available via our GitHub repository.
Tweet preprocessing was performed using a wrapper to the tm package. Briefly, extra white space was stripped; numbers, stop words, punctuation, and low-frequency terms were removed; and words were stemmed using snowball stemmers.
After constructing the tweet term matrix and the vocabulary index of words in the corpus, we then used the stm package to estimate a structural topic model (STM) using semi-collapsed variational EM. STMs permit the study of interaction betweeen tweet-level covariates (from feature extraction) and topical prevalence and/or content. We use spectral initialization and applied the algorithm of Lee and Mimno (2014) to estimate the number of topics. A maximum of 100 EM iterations were permitted; if convergence was not met at this point, the model was discarded.
The resulting topics were examined, and topics of interest were selected for further analysis. For each topic, top tweets ranked by the MAP estimate of the topic’s theta value (which captures the modal estimate of the proportion of word tokens assigned to the topic under the model) were identified. Representative tweets are displayed here.
#LargestVaccineDrive:
— Regional Outreach Bureau, Lucknow (@adgroblko) July 1, 2021
➡️ More than 9.36 Cr Vaccine doses administered in the age group 18-44, so far.
➡️ More than 13.43 Lakh vaccine doses administered to 18-44 age group for first dose today.
Details: https://t.co/gsze6Buq5y#We4Vaccine#IndiaFightsCorona#Unite2FightCorona pic.twitter.com/HWqdQx4NAX
Waterloo 18+ Moderna
— Vaccine Hunters Ontario (@VaxHuntersON) July 1, 2021
Appts avail at:
-Ryerson P.S. - July 2/3
-Forest Heights - July 3
-Resurrection C.S.S. - July 6-10
-St. Mary’s H.S. - July 6-10
-Pinebush - July 30/Aug 1
Book here: https://t.co/S0t5kQCLes#COVID19ON #COVID19Vaccine #vhcON #VHCDose2
📌 #COVID19VaccinationUpdate
— PIB in Assam (@PIB_Guwahati) July 1, 2021
India’s COVID-19 Vaccination Coverage reaches nearly 34 Cr
More than 38.17 lakh Vaccine Doses administered today till 7 pm
More than 9.61 Cr Vaccine doses administered in the age group 18-44, so far
🔗 https://t.co/VsSuG10Cvh@MoHFW_INDIA pic.twitter.com/3beeCEy3D6
A walk-in vaccination clinics at @RJAH_NHS today, no appointment necessary…just walk in and #grabajab!
— Shropshire, Telford & Wrekin ICS (@STW_ICS) July 1, 2021
- Pfizer Clinic (18-39) 8am to 1pm.
- AstraZeneca Clinic (40s and over) 2pm to 5.30pm
More clinics here: https://t.co/ZI9hst3B3a#getthejabdoneSTW pic.twitter.com/pPQZoh9lRE
Aged 18 or over❓ Not had your #COVID19 vaccination yet❓
— NHS Northumberland CCG 🌈💙 (@NHSNlandCCG) July 1, 2021
GRAB A JAB this week at Hexham Mart!💉
No appointments needed👇@alnwickgazette @hexhamcourant @ActiveNland @N_landCouncil @NorthumberlandR @hexhamtv @BBCNEandCumbria @ChronicleLive @NorthumbriaNHS pic.twitter.com/qgEvB3DsV0
Vaccine appointments available at Walgreens Morton Grove from Jul 1 to Jul 15. Sign up here, zip code 60053:https://t.co/nZkkxk2ES3 (as of 11:01) 😷
— edgar vaccine bot (@VaccineEdgar) July 1, 2021
Topic 5 pertains to vaccination; specifically, vaccine scheduling and availability. Representative tweets are displayed here. Please note that tweets have not been filtered for objectionable content, and presentation here does not imply endorsement.
Hmm... You're at 48% with the perfect storm of Brexit, Covid, and a "Toaaarrrie" government in Westminster. As for "we havent (sic) started yet"—you've had years of constant agitation for #Scexit with no concerted opposition.
— yescotland (@yescotland) July 1, 2021
I do not miss the incompetence, inexperience, whining, self grandizing and regressive policies from the failed Trump Presidency that culminated in a bungled pandemic response and a violent insurrection.
— Doreen (@DoreenL53510887) July 1, 2021
Well if Trump had not thrown out the Pandemic Playbook left by the Obama/Biden Administration they would not have killed 1000’s of Americans & wrecked the economy left by the Obama/Biden Administration. Republicans create crises. Democrats fix them.
— Dorthea Crenshaw (@dorthealynn) July 1, 2021
Nice sentiment. But the federal govt already spent $4.7 trillion extra on COVID in 2020 plus Biden's own $1.9 trillion. He wants the federal budget to increase by 50% to $6 trillion. This doubles the annual deficit to $2 trillion and the national debt to $30 trillion.
— Vaccinated and NOT masking (@marc_v27) July 1, 2021
COVID allowed our government to enact the biggest wealth transfer ever… and you should be furious https://t.co/ndJH0BexRR #FoxBusiness
— Lois Levine Fishman (@FishmanLevine) July 1, 2021
Topic 9 contains tweets discussing politics and COVID-19. Representative tweets are displayed here. Please note that tweets have not been filtered for objectionable content, and presentation here does not imply endorsement.
Saluting the efforts of our real heroes, IFW wishes a very happy doctor's day. Pandemic has once again reminded us about the contributions and sacrifices made by #doctors and #healthcareworkers around the globe!#doctorsday #doctors #doctor #ifw #ifwwebstudio #digitalmarketing pic.twitter.com/9V9Z22oPYa
— IFW Web Studio (@IFWWebStudio) July 1, 2021
Happy National Doctor's Day!! #Sprw thanks all the health workers across the world for their service. We salute all doctors.#NationalDoctorsDay #ThankYou #Hardwork #Doctors #SuperHeros #Gratitude #RealHero #TopicalSpot #trending #DoctorsDay2021 #medical #COVID19 #saviour #sprw pic.twitter.com/lAUgUOh6ZV
— SP Robotic Works (@sproboticworks) July 1, 2021
"Medicine cures disease but doctors heal patients”. Let us, as a nation salute the medical fraternity for their tireless effort and hard work during the challenging times of this pandemic. Wishing all the Doctors A Happy Doctor’s Day.#doctorsday #nationaldoctorsday pic.twitter.com/q1pBFoKtPT
— Divecha Centre for Climate Change (@DivechaFor) July 1, 2021
Doctors are the true warriors to save people in the world pandemic. Wishing you happy National Doctors' Day!
— Shivam Giri (@Shivamgiri_) July 1, 2021
“Medicines cure diseases, but only doctors can cure patients.” - Carl Jung#DoctorsDay#NationalDoctorsDay#neet2021 #medtwitter Happy Doctors #DoctorsDay2021 #Doctor pic.twitter.com/1poDpsML5L
National Doctor’s Day is an opportunity to thank all the heroes in the medical fraternity for their selfless contributions. We express our sincere gratitude to the brave souls working round the clock to heal the world from this pandemic.
— anshuman (@anshuman131073) July 1, 2021
Happy Doctor's Day ...❤❤
Topic 14 contains tweets expressing gratitude to doctors and frontline healthcare workers. Representative tweets are displayed here. Please note that tweets have not been filtered for objectionable content, and presentation here does not imply endorsement.
From CNN: Surgeon General on Delta variant: If you are not vaccinated, you are in trouble Surgeon General on Delta variant: If you are not vaccinated, you are in troublehttps://t.co/afiKkM7yZW
— Amanda Searant (@Amandat77144062) July 1, 2021
Dr Fauci says 'quite concerned' over Delta COVID variant in US, infection spread prompts reconsideration of precautions#Fauci #DeltaVariante #DeltaPlusVariant #WHOhttps://t.co/kIqBfxu9BP
— Catch News (@CatchNews) July 1, 2021
“If you are vaccinated you’re probably unlikely to get it, and if you do it should be mild,” Dr. Leverence said.
— Katye Brought (@KatyeBrought) July 1, 2021
The Delta variant is spreading rapidly in unvaccinated populations. Get vaccinated! https://t.co/qbazwB0l74
The only people who are dying from #COVID are unvaccinated people.
— Rick Marín (@rcmarin963) July 1, 2021
People spreading the #Delta variant are more likely than not, unvaccinated people.
…and they’re still refusing to get vaccinated.
CDC director: Delta variant is growing threat to unvaccinated people https://t.co/4cw2YcVJ3v
— POLITICO Pro (@POLITICOPro) July 1, 2021
Doesn’t get any simpler than this folks: “Vaccinated people are safer than ever despite the variants. But unvaccinated people are in more danger than ever because of the variants.” https://t.co/n6Q82sukMZ
— David Simerly (@davidksimerly) July 1, 2021
"It does appear that the vaccines we have do work against the Delta variant. They appear to be less effective against Delta than they were against Alpha and other previously dominant variants." https://t.co/mqbmPpJVPG
— KION News 5 46 (@KION546) July 1, 2021
The growing threat to the unvaccinated: “it’s even more important that people who aren’t vaccinated yet quickly get the vaccine before the delta variant reaches them” https://t.co/10VUGQ9Vsm
— Jonathan Overpeck (@GreatLakesPeck) July 1, 2021
The Delta variant is more transmittable.https://t.co/YRBSjB3ahF
— Dan 🌊 #MaskItOrCasket #EndQualifiedImmunity #FBR (@immydadsson) July 1, 2021
the who said that?
— Anarcho-based (@anarchy361) July 1, 2021
If so ye I agree the CDC should as well but it seems that to vaxxed people the delta variant isn't that major of a threat?
Topic 34 pertains to the Delta COVID-19 variant. Representative tweets are displayed here. Please note that tweets have not been filtered for objectionable content, and presentation here does not imply endorsement.
Roberts, M., Stewart, B., Tingley, D., and Airoldi, E. (2013) “The structural topic model and applied social science.” In Advances in Neural Information Processing Systems Workshop on Topic Models: Computation, Application, and Evaluation.
Roberts M., Stewart, B. and Airoldi, E. (2016) “A model of text for experimentation in the social sciences” Journal of the American Statistical Association.
Roberts, M., Stewart, B., Tingley, D., Lucas, C., Leder-Luis, J., Gadarian, S., Albertson, B., et al. (2014). Structural topic models for open ended survey responses. American Journal of Political Science, 58(4), 1064-1082.
Roberts, M., Stewart, B., & Tingley, D. (2016). “Navigating the Local Modes of Big Data: The Case of Topic Models. In Data Analytics in Social Science, Government, and Industry.” New York: Cambridge University Press.
Lee, M. and Mimno, D. (2014) “Low-dimensional Embeddings for Interpretable Anchor-based Topic Inference.” In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), 1319–1328.